/*
 * @Copyright: 2025 Copyright (C) AMCAX, All rights reserved.
 * @Author: Zhang
 * @Date: 2025/7/29 11:19
 * @LastEditTime: 2025/7/29 11:19
 * @LastEditors: Zhang
 * @Description:
 */

import { i18n } from '@/common/utils';
import { RJSFSchema, UiSchema } from '@rjsf/utils';
import { CollapseTemplate } from 'nextcae-base';
import { SelectionPickField2 } from '@/components/FieldTemplate/SelectionPickField2';

const titles = {
  source: i18n.t('public.Source'),
};
export const schema: RJSFSchema = {
  type: 'object',
  properties: {
    Options: {
      type: 'object',
      title: i18n.t('public.option'),
      properties: {
        typeOptions: {
          title: i18n.t('modelClean.ModelCleanType'),
          type: 'string',
          default: 'MeshRepair',
        },
      },
    },
  },
};

export const uiSchema: UiSchema = {
  Options: {
    'ui:FieldTemplate': CollapseTemplate,
    'ui:layout': [3, 7],
    'ui:options': {
      label: false,
    },
    typeOptions: {
      'ui:field': 'selectionField',
      'ui:options': {
        options: [
          {
            const: 'MeshRepair',
            title: i18n.t('modelClean.MeshRepair'),
          },
          {
            const: 'HoleRepair',
            title: i18n.t('modelClean.HoleRepair'),
          },
        ],
      },
    },
  },
};
